package com.jumi.microservice.service.admin;

import com.jumi.microservice.dto.comment.api.CommentApiOneRequest;
import com.jumi.microservice.dto.comment.api.CommentApiOneResponse;
import com.jumi.microservice.service.CommentService;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;

/**
 * @author Scw
 * @Date 2020-08-04 17:56
 */
@DubboService
public class CommentServiceImpl implements CommentService {

    @Resource
    private com.jumi.microservice.service.api.CommentService commentService;

//    @Override
//    public TableDataInfo<CommentApiUidResponse> commentListUid(CommentApiUidRequest commentApiUidRequest) {
//        return commentService.commentListUid(commentApiUidRequest);
//    }

    @Override
    public CommentApiOneResponse commentNewOne(Long spuId) {
        CommentApiOneRequest commentApiOneRequest = new CommentApiOneRequest();
        commentApiOneRequest.setSpuGid(spuId.intValue());
        return commentService.commentNewOned(commentApiOneRequest);
    }
}
